#!/bin/env bash
# dependency: xtitle

ids=($(bspc query -N -n .hidden.window)) || exit
options="$(xtitle "${ids[@]}")"

id_index="$(<<< "$options" rofi -dmenu -format i)"
if [[ -n "${id_index}" ]]; then
    bspc node "${ids[${id_index}]}" -g hidden=off -f
fi
